Skip to content

BehaviorSignal class

Attributes: [DebuggerDisplay("{DebuggerDisplay,nq}")]

Defined in

Namespace: ReactiveUI.Primitives.Signals Assembly: ReactiveUI.Primitives.Core.dll Full name: ReactiveUI.Primitives.Signals.BehaviorSignal<T> Modifiers: public sealed

Summary

View source

A signal that replays its most recent value to new subscribers.

Applies to

net10.0, net10.0, net10.0-desktop1.0, net10.0-desktop1.0, net10.0-browserwasm1.0, net10.0-browserwasm1.0, net9.0, net9.0, net9.0-desktop1.0, net9.0-desktop1.0, net9.0-browserwasm1.0, net9.0-browserwasm1.0, net8.0, net8.0, net8.0-ios17.5, net8.0-macos14.5, net8.0-macos14.5, net8.0-macos14.2, net8.0-macos14.2, net8.0-maccatalyst17.5, net8.0-maccatalyst17.5, net8.0-tvos17.2, net8.0-tvos17.2, net8.0-ios17.5, netstandard2.1, netstandard2.1, net481, net462, net462, net481

Class hierarchy
classDiagram
class BehaviorSignal~T~
class ISignal~T~ {
    <>
}
ISignal~T~ <|.. BehaviorSignal~T~
class ISignal~T, T~ {
    <>
}
ISignal~T, T~ <|.. BehaviorSignal~T~
class IObserver~T~ {
    <>
}
IObserver~T~ <|.. BehaviorSignal~T~
class IObservable~T~ {
    <>
}
IObservable~T~ <|.. BehaviorSignal~T~
class IsDisposed {
    <>
}
IsDisposed <|.. BehaviorSignal~T~
class IDisposable {
    <>
}
IDisposable <|.. BehaviorSignal~T~
class IWitnessRemovable~T~ {
    <>
}
IWitnessRemovable~T~ <|.. BehaviorSignal~T~

Implements: ISignal, ISignal, IObserver, IObservable, IsDisposed, IDisposable, IWitnessRemovable<T>

Constructors

NameSummary
.ctorInitializes a new instance of the [BehaviorSignal](# class.

Properties

NameSummary
ValueGets the current value or throws an exception.
HasObserversGets a value indicating whether this instance has observers.
IsDisposedGets a value indicating whether this instance is disposed.

Methods

NameSummary
TryGetValueTries to get the current value or throws an exception.
OnCompletedNotifies all subscribed observers about the end of the sequence.
OnErrorNotifies all subscribed observers about the exception.
OnNextNotifies all subscribed observers about the arrival of the specified element in the sequence.
SubscribeSubscribes an observer to the subject.
DisposeReleases unmanaged and - optionally - managed resources.
Inherited members